<template>
  <div>
    {{$store.getters.token}}
    <br>
    {{$store.state.user.token}}
    <br>
    {{$store.state.setting.name}}
    <br>
    <button @click="setToken(777)">登录</button>
  </div>
</template>

<script>
import {createNamespacedHelpers} from 'vuex'
// console.log(createNamespacedHelpers('user'));
const {mapMutations} = createNamespacedHelpers('user')
export default {
  methods: {
    ...mapMutations(['setToken'])
  }
}
</script>

<style>

</style>